var IgnitionKey = {
    keyOff: "0",
    keyAcc: "0",
    keyOn: "0",
    keyStart: "1",
    runStatus: "1",
    ignCount: "0"
};
// let VehicleDescription={
//     vehType : "Magoton"
// }
var SensorInstall = {
    In1_num0: "1",
    In1_num1: "1",
    In1_num2: "1"
};
var SensorFault = {
    In1_num0: "1",
    In1_num1: "1",
    In1_num2: "1"
};
var InputPara = {
    IgnitionKey: IgnitionKey,
    // VehicleDescription,
    SensorInstall: SensorInstall,
    SensorFault: SensorFault
};
var IgnSigOut = {
    Out2Dash_IgnSig: "0"
};
// let stopGet;
// function startObd():void{
//     if(VehicleDescription.vehType=="Magoton"){
//         IgnitionKey.keyOff="0",
//         IgnitionKey.keyOn="1"
//         console.log(modelOutPara);
//        stopGet=setTimeout("startObd()",1000);
//     }
// }
// function stopObd(){
//         clearTimeout(stopGet);
// }
// class ObdData{
//     private InputPara1;
//     public getInputData(){
//         return this.InputPara1;
//     }
//     public setInputData(InputPara){
//        this.InputPara1=InputPara;
//     }
// }
// let modelInPara= new ObdData();
//     modelInPara.setInputData(InputPara);
// let modelOutPara=modelInPara.getInputData();
//     console.log(modelOutPara);
// class DashKeyLogic{
// }
var keySwitchIn = (function () {
    if (InputPara.IgnitionKey.keyOff == "1") {
        return 0;
    }
    else if (InputPara.IgnitionKey.keyAcc == "1") {
        return 1;
    }
    else if (InputPara.IgnitionKey.keyOn == "1") {
        return 2;
    }
    else if (InputPara.IgnitionKey.keyStart == "1") {
        return 3;
    }
    else {
        return 0;
    }
})();
//console.log(keySwitchIn);
var ignSigOk = (function () {
    if (keySwitchIn == 0) {
        return "0";
    }
    else if (keySwitchIn == 1) {
        return "1";
    }
    else if (keySwitchIn == 2) {
        return "2";
    }
    else if (keySwitchIn == 3) {
        return (function () {
            if (InputPara.IgnitionKey.runStatus == "1") {
                return 20;
            }
        })();
    }
    else {
        return "0";
    }
})();
//console.log(IgnSigOut.Out2Dash_IgnSig = ignSigOk);
//console.log(ignSigOk);
var Greeter = (function () {
    function Greeter(message) {
        this.greeting = message;
    }
    Greeter.prototype.greet = function () {
        return "Hello, " + this.greeting;
    };
    return Greeter;
}());
var greeter = new Greeter("world");
console.log(greeter.greet());
